#ifndef CTask_h__
#define CTask_h__


class CTask
{
public:
	COleDateTime	taskTime;
	COleDateTime	noteTime;
	BOOL			bOK;
	string			title;
	string			content;
public:
	CTask(COleDateTime _tm , string _title, string _content, COleDateTime _nt=COleDateTime(), BOOL _bok = -1)
		:taskTime(_tm),title(_title),content(_content),noteTime(_nt),bOK(_bok)
	{	
		if (noteTime.Format("%Y-%m-%d %H:%M:%S") == "1899-12-30 00:00:00")// TODO zz
		{
			noteTime = COleDateTime::GetCurrentTime();	
		}
		if (bOK == -1)
		{
			bOK = FALSE;	
		}
	}
	CTask(byte * buff, int len);
	CTask(const CTask & t){
		taskTime = t.taskTime;
		noteTime = t.noteTime;
		bOK = t.bOK;
		title = t.title;
		content = t.content;
	}
	CTask(){}

	byte * MakeBuff(int & len);
	int operator < (const CTask &m)const {
		return taskTime< m.taskTime;
	}
	int operator > (const CTask &m)const {
		return taskTime> m.taskTime;
	}
// 	BOOL ParseBuff(byte * buff, int  len);
};

#endif // CTask_h__